﻿// ----------------------------------------------------------------------------------
// Microsoft Developer & Platform Evangelism
// 
// Copyright (c) Microsoft Corporation. All rights reserved.
// 
// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, 
// EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES 
// OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
// ----------------------------------------------------------------------------------
// The example companies, organizations, products, domain names,
// e-mail addresses, logos, people, places, and events depicted
// herein are fictitious.  No association with any real company,
// organization, product, domain name, email address, logo, person,
// places, or events is intended or should be inferred.
// ----------------------------------------------------------------------------------

//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.1
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

// Original file name: TFSModel.cs
// Generation date: 03/11/2010 08:13:31 p.m.
namespace Microsoft.Samples.DPE.ODataTFS.Model.Entities
{
    /// <summary>
    /// There are no comments for Microsoft.Samples.DPE.ODataTFS.Model.Entities.Attachment in the schema.
    /// </summary>
    /// <KeyProperties>
    /// Id
    /// </KeyProperties>
    [global::System.Data.Services.Common.EntitySetAttribute("Attachments")]
    [global::System.Data.Services.Common.EntityPropertyMappingAttribute("AttachedTime", System.Data.Services.Common.SyndicationItemProperty.Updated, System.Data.Services.Common.SyndicationTextContentKind.Plaintext, true)]
    [global::System.Data.Services.Common.EntityPropertyMappingAttribute("Name", System.Data.Services.Common.SyndicationItemProperty.Title, System.Data.Services.Common.SyndicationTextContentKind.Plaintext, true)]
    [global::System.Data.Services.Common.EntityPropertyMappingAttribute("Comment", System.Data.Services.Common.SyndicationItemProperty.Summary, System.Data.Services.Common.SyndicationTextContentKind.Plaintext, true)]
    [global::System.Data.Services.Common.HasStreamAttribute()]
    [global::System.Data.Services.Common.DataServiceKeyAttribute("Id")]
    public partial class Attachment : global::System.ComponentModel.INotifyPropertyChanged
    {
        /// <summary>
        /// Create a new Attachment object.
        /// </summary>
        /// <param name="ID">Initial value of Id.</param>
        /// <param name="workItemId">Initial value of WorkItemId.</param>
        /// <param name="index">Initial value of Index.</param>
        /// <param name="attachedTime">Initial value of AttachedTime.</param>
        /// <param name="creationTime">Initial value of CreationTime.</param>
        /// <param name="lastWriteTime">Initial value of LastWriteTime.</param>
        /// <param name="length">Initial value of Length.</param>
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public static Attachment CreateAttachment(string ID, int workItemId, int index, global::System.DateTime attachedTime, global::System.DateTime creationTime, global::System.DateTime lastWriteTime, long length)
        {
            Attachment attachment = new Attachment();
            attachment.Id = ID;
            attachment.WorkItemId = workItemId;
            attachment.Index = index;
            attachment.AttachedTime = attachedTime;
            attachment.CreationTime = creationTime;
            attachment.LastWriteTime = lastWriteTime;
            attachment.Length = length;
            return attachment;
        }
        /// <summary>
        /// There are no comments for Property Id in the schema.
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string Id
        {
            get
            {
                return this._Id;
            }
            set
            {
                this.OnIdChanging(value);
                this._Id = value;
                this.OnIdChanged();
                this.OnPropertyChanged("Id");
            }
        }
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _Id;
        partial void OnIdChanging(string value);
        partial void OnIdChanged();
        /// <summary>
        /// There are no comments for Property WorkItemId in the schema.
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public int WorkItemId
        {
            get
            {
                return this._WorkItemId;
            }
            set
            {
                this.OnWorkItemIdChanging(value);
                this._WorkItemId = value;
                this.OnWorkItemIdChanged();
                this.OnPropertyChanged("WorkItemId");
            }
        }
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private int _WorkItemId;
        partial void OnWorkItemIdChanging(int value);
        partial void OnWorkItemIdChanged();
        /// <summary>
        /// There are no comments for Property Index in the schema.
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public int Index
        {
            get
            {
                return this._Index;
            }
            set
            {
                this.OnIndexChanging(value);
                this._Index = value;
                this.OnIndexChanged();
                this.OnPropertyChanged("Index");
            }
        }
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private int _Index;
        partial void OnIndexChanging(int value);
        partial void OnIndexChanged();
        /// <summary>
        /// There are no comments for Property AttachedTime in the schema.
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public global::System.DateTime AttachedTime
        {
            get
            {
                return this._AttachedTime;
            }
            set
            {
                this.OnAttachedTimeChanging(value);
                this._AttachedTime = value;
                this.OnAttachedTimeChanged();
                this.OnPropertyChanged("AttachedTime");
            }
        }
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private global::System.DateTime _AttachedTime;
        partial void OnAttachedTimeChanging(global::System.DateTime value);
        partial void OnAttachedTimeChanged();
        /// <summary>
        /// There are no comments for Property CreationTime in the schema.
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public global::System.DateTime CreationTime
        {
            get
            {
                return this._CreationTime;
            }
            set
            {
                this.OnCreationTimeChanging(value);
                this._CreationTime = value;
                this.OnCreationTimeChanged();
                this.OnPropertyChanged("CreationTime");
            }
        }
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private global::System.DateTime _CreationTime;
        partial void OnCreationTimeChanging(global::System.DateTime value);
        partial void OnCreationTimeChanged();
        /// <summary>
        /// There are no comments for Property LastWriteTime in the schema.
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public global::System.DateTime LastWriteTime
        {
            get
            {
                return this._LastWriteTime;
            }
            set
            {
                this.OnLastWriteTimeChanging(value);
                this._LastWriteTime = value;
                this.OnLastWriteTimeChanged();
                this.OnPropertyChanged("LastWriteTime");
            }
        }
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private global::System.DateTime _LastWriteTime;
        partial void OnLastWriteTimeChanging(global::System.DateTime value);
        partial void OnLastWriteTimeChanged();
        /// <summary>
        /// There are no comments for Property Name in the schema.
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string Name
        {
            get
            {
                return this._Name;
            }
            set
            {
                this.OnNameChanging(value);
                this._Name = value;
                this.OnNameChanged();
                this.OnPropertyChanged("Name");
            }
        }
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _Name;
        partial void OnNameChanging(string value);
        partial void OnNameChanged();
        /// <summary>
        /// There are no comments for Property Extension in the schema.
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string Extension
        {
            get
            {
                return this._Extension;
            }
            set
            {
                this.OnExtensionChanging(value);
                this._Extension = value;
                this.OnExtensionChanged();
                this.OnPropertyChanged("Extension");
            }
        }
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _Extension;
        partial void OnExtensionChanging(string value);
        partial void OnExtensionChanged();
        /// <summary>
        /// There are no comments for Property Comment in the schema.
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string Comment
        {
            get
            {
                return this._Comment;
            }
            set
            {
                this.OnCommentChanging(value);
                this._Comment = value;
                this.OnCommentChanged();
                this.OnPropertyChanged("Comment");
            }
        }
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _Comment;
        partial void OnCommentChanging(string value);
        partial void OnCommentChanged();
        /// <summary>
        /// There are no comments for Property Length in the schema.
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public long Length
        {
            get
            {
                return this._Length;
            }
            set
            {
                this.OnLengthChanging(value);
                this._Length = value;
                this.OnLengthChanged();
                this.OnPropertyChanged("Length");
            }
        }
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private long _Length;
        partial void OnLengthChanging(long value);
        partial void OnLengthChanged();
        /// <summary>
        /// There are no comments for Property Uri in the schema.
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string Uri
        {
            get
            {
                return this._Uri;
            }
            set
            {
                this.OnUriChanging(value);
                this._Uri = value;
                this.OnUriChanged();
                this.OnPropertyChanged("Uri");
            }
        }
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _Uri;
        partial void OnUriChanging(string value);
        partial void OnUriChanged();
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        protected virtual void OnPropertyChanged(string property)
        {
            if ((this.PropertyChanged != null))
            {
                this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property));
            }
        }
    }
}
